<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script src="index.js"></script>

  <script>

    MyPromise.any([
      new MyPromise((resolve, reject) => {
        setTimeout(() => {
          reject(4)
        }, 2000);
      }),
      new MyPromise((resolve, reject) => {
        setTimeout(() => {
          reject(5)
        }, 1000);
      }),
      new MyPromise((resolve, reject) => {
        setTimeout(() => {
          reject(6)
        }, 300);
      }),
    ]).then(value => {
      console.log(value, 'value');
    }).catch(reason => {
      console.dir(reason)
      console.log(reason, 'reason');
    })

  </script>
</body>
</html>